#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

class Solution {
        vector<int> sum;

    public:
	int mergeStones(vector<int> &stones, int k)
	{
                int n = stones.size();
                if(n % (k - 1) != 1){
                        return -1;
                }
                sum.resize(n, 0);
                sum[0] = stones[0];
                for(int i = 1; i < n; i++){
                        sum[i] = stones[i] + sum[i - 1];
                }
                

	}
};

int main()
{
	vector<int> stones = { 3, 2, 4, 1 };
	int K = 2;
}